package com.springbootbase.springbootproject.pojo;



import com.fasterxml.jackson.annotation.JsonIgnore;
import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import lombok.Data;

import java.time.LocalDateTime;
@Data  //自动装载 getter，setter，tostring，equal等方法
public class User {
    @NotNull
    private Integer id;//主键ID
    private String username;//用户名
    @JsonIgnore //当 user 以 json 格式输出时，不返回密码字段
    private String password;//密码
    @NotNull
    private String userType; //用户类型  student/teacher/admin
    private LocalDateTime createTime;//创建时间
    private LocalDateTime updateTime;//更新时间
}
